#include <iostream>

using std::cout;
using std::endl;

int
max(int a, int b)
{
    return (a > b) ? a : b;
}

int
min(int a, int b)
{
    return (a < b) ? a : b;
}

int
p_padding(int n)
{
    for (int j = 0; j < n; ++j)
    {
        cout << " ";
    }
}

int
p_hashes(int n)
{
    for (int j = 0; j < n; ++j)
    {
        cout << "#";
    }
}

int
main(int argc, char **argv)
{
    for (int i = 0; i < 8; ++i)
    {
        int spaces  = 3 - max(3 - i, i - 4);
        int hashes  = 1 + spaces;
        int padding = 2 * (3 - spaces);

        p_padding(spaces);
        p_hashes(hashes);
        p_padding(padding);
        p_padding(padding);
        p_hashes(hashes);

        cout << endl;
    }
}
